package Behavioral.Observer.demo1;

import org.testng.collections.Lists;

import java.util.List;

public class Child {

	private List<Observer> observers = Lists.newArrayList(new FatherObserver(), new MotherObserver());


	public void wakeUp() {
		WakeUpEvent event = new WakeUpEvent(System.currentTimeMillis(), "bed", this);
		for (Observer observer : observers) {
			observer.actionOnWakeUp(event);
		}
	}
}
